import request from "@/utils/request.js"

export default{

  findById(id){
    return request({
      url:`/processBom/${id}`,
      method:'get'
    });
  },
  findAll(page,size){
    return request({
      url:`/processBom/${page}/${size}`,
      method:'get'
    });
  },
  findAllBom(){
    return request({
      url:`/processBom/`,
      method:`get`
    });
  },
  deleteById(id){
    return request({
      url:`/processBom/${id}`,
      method:'delete'
    });
  },
  save(processBom){
    return request({
      url:`/processBom`,
      method:'post',
      data:processBom
    });
  },
  update(id,processBom){
    if(id==='' || id===null){
      return this.save(processBom)
    }
    return request({
      url:`/processBom/${id}`,
      method:'put',
      data:processBom
    });
  },
  search(searchMap,page,size){
    return request({
      rtl:`/processBom/search/${page}/${size}`,
      method:'post',
      data:searchMap
    });
  }


}
